package com.rg.util;

import org.junit.Test;
import static org.junit.Assert.*;

public class Cstack_intTest{
    Cstack_int test1;

    @Before
    public void setUp() {
        System.out.println("Before");
        test1 = new Cstack_int();
    }

    @Afterclass
    public static void tearDownAfterClass() {
        System.out.println("Finished");
    }

    @Test
    public void testEmpty() {
        System.out.println("testEmppty:");
        assertEquals(true, test1.empty());
    }

    @Test
    public void testPeek() {
        System.out.println("testPeek:");
        test1.push(1);
        assertEquals(1, test1.peek());
    }

    @Test
    public void testGetSize() {
        System.out.println("testGetSize:");
        test1.push(1);
        test1.push(2);
        test1.push(3);
        test1.pop();
        assertEquals(2, test1.getsize());
    }
}